﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace database
{
    class db
    {
        MySql.Data.MySqlClient.MySqlConnection conn;
        MySql.Data.MySqlClient.MySqlCommand cmd;
        public db()
        {
        conn = new MySql.Data.MySqlClient.MySqlConnection("server=127.0.0.1;uid=root;pwd=ALEX42695;database=mybd;");
        conn.Open();
        cmd.Connection = conn;
        }
       
        void data_insert()
        {
            cmd.CommandText = "INSERT INTO users(user_id,login,password,role,mail) VALUE(1,A,A,1,A)";
            //cmd.CommandText = "INSERT INTO (user_id,login,password,role,mail) VALUE(1,A,A,1,A)";
            cmd.ExecuteNonQuery();
        }
    }
}
